package top.fkxuexi.blogapi.modules.auth.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.fkxuexi.blogapi.modules.auth.dao.SysRoleDAO;
import top.fkxuexi.blogapi.modules.auth.entity.SysRole;
import top.fkxuexi.blogapi.modules.auth.service.SysRoleService;

import java.util.List;

/**
 * @Author blog.fkxuexi.top
 * @Gitee: https://gitee.com/smartwork/
 * @Descri: 用户角色表
 */
@Transactional
@Service
public class SysRoleServiceImpl implements SysRoleService {

    @Autowired
    private SysRoleDAO sysRoleDAO;


    @Override
    public List<String> getRolePermissionByUserId(Integer userId) {

        return sysRoleDAO.getRolePermissionByUserId(userId);
    }

    @Override
    public List<String> getRoleNameListByUserId(Integer userId) {
        return sysRoleDAO.getRoleNameListByUserId(userId);
    }

    @Override
    public List<SysRole> getRoleListByUserId(Integer userId) {
        return sysRoleDAO.getRoleListByUserId(userId);
    }
}